<html>
<head>
    <style type="text/css">
    </style>
</head>
<body>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
  <script src="js/highcharts.js" type="text/javascript"></script>
  <script src="http://www.openlayers.org/api/OpenLayers.js"></script>

  <div id="mapdiv" style="width: 100%; height: 90%"></div><br/>
<!--
  <table border="0">
	<tr>
	<td><div id="statsdiv1" style="width: 45%; height: 22%"/></td>
	<td><div id="statsdiv2" style="width: 45%; height: 22%"/></td>
	</tr>
  </table>
-->
  <script>
    map = new OpenLayers.Map("mapdiv");
    map.addLayer(new OpenLayers.Layer.OSM());
 
    var pois = new OpenLayers.Layer.Text( "BTS",
                    { location:"oldata.txt",
                      projection: map.displayProjection
                    });
    map.addLayer(pois);
    pois.adjustBounds();
    var extent = pois.getDataExtent();
 
    //Set start centrepoint and zoom    
    var lonLat = new OpenLayers.LonLat( 9.5788, 48.9773 )
          .transform(
            new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
            map.getProjectionObject() // to Spherical Mercator Projection
          );
    var zoom=11;
    map.setCenter (lonLat, zoom);

    function intelligentZoom() {
       map.zoomToExtent(pois.getDataExtent());
    }
	
    pois.events.register("loadend", pois, intelligentZoom); 
  </script>

</body></html>

